package org.particlethink.utils;

import java.util.List;
import java.util.Map;
import java.util.function.BiFunction;
import java.util.stream.Collectors;

public class ListUtil {

    public static <K, V, T> List<T> mapToObjList(Map<K, V> map, BiFunction<K, V, T> converter) {
        return map.entrySet().stream()
                .map(entry -> converter.apply(entry.getKey(), entry.getValue()))
                .collect(Collectors.toList());
    }
}
